package com.nd.android.u.ui.chatBottomFunction;

import android.app.Activity;
import android.support.v4.app.Fragment;

import com.nd.android.u.controller.factory.ChatBottomFunctionFactory.ISpecialProccess;
import com.nd.android.u.controller.innerInterface.IBottomFunction;
import com.nd.android.u.ui.R;
import com.nd.android.u.ui.chatUiUtils.ChatViewUtil;
import com.product.android.business.ApplicationVariable;
/**
 * 查看本地相册
 * <br>Created 2014-8-11 下午9:54:41
 * @version  
 * @author   cb		
 * @see 	 
 */
public class BottomFunction_Photo implements IBottomFunction {

    @Override
    public String getLabel() {
        return ApplicationVariable.INSTANCE.applicationContext.getString(R.string.list_grid_item_photo);
    }

    @Override
    public int getAppResId() {
    	return R.drawable.app_picture;
    }

    @Override
    public boolean isEnable(int MessageType, long subType) {
        return true;
    }

	@Override
	public void onClick(Activity context, Fragment fragment,ISpecialProccess proccess) {
		if (context==null && fragment==null){
			return;
		}
		if (fragment!=null){
			ChatViewUtil.openPhotoLibrary(fragment);
		}else{
			ChatViewUtil.openPhotoLibrary(context);
		}
	}
}
